<?php

Raise::load('control.form.RaiseFormFieldCollection');

/**
 * TestControlRaiseFormFieldCollection class
 * Testing unit of 'phpraise/control/RaiseFormFieldCollection.php'
 *
 * @author Sam-Mauris Yong / hellclanner at live dot com
 * @license http://www.opensource.org/licenses/bsd-license New BSD License
 * @package Raise.UnitTest.Test
 */
class TestControlRaiseFormFieldCollection extends RaiseTest {
    
    public static function testClass(){
        self::assertClassExists('RaiseFormFieldCollection');
        self::assertClassExtends('RaiseFormFieldCollection', 'RaiseFormField');
        self::assertClassMethod('RaiseFormFieldCollection', 'collection');
        self::assertClassMethod('RaiseFormFieldCollection', 'output');
    }

    public static function testUsage(){
        $fields = new RaiseFormFieldCollection();
        $fields->clientId('test');
        self::assertObjectClass($fields->collection(), 'RaiseTypedCollection');
        self::assertStrictEqual($fields->collection()->type(), 'RaiseFormField');
        self::assertType($fields->output(), 'string');
    }

}
